package com.wodsy.phoenix.dataobject.orderc.model;

import com.wodsy.phoenix.dataobject.base.PhoenixObject;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * OrderStatusChangeLog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tb_order_status_change_log", catalog = "orderc")
public class OrderStatusChangeLog extends PhoenixObject {

	// Fields

	private Integer id;
	private Integer orderId;
	private Order.OrderStatus status;
	private Date createTime;
	private Date updateTime;

	// Constructors

	/** default constructor */
	public OrderStatusChangeLog() {
	}

	/** minimal constructor */
	public OrderStatusChangeLog(Integer orderId, Order.OrderStatus status,
			Date createTime) {
		this.orderId = orderId;
		this.status = status;
		this.createTime = createTime;
	}

	/** full constructor */
	public OrderStatusChangeLog(Integer orderId, Order.OrderStatus status,
			Date createTime, Date updateTime) {
		this.orderId = orderId;
		this.status = status;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "order_id", nullable = false)
	public Integer getOrderId() {
		return this.orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	@Column(name = "status", nullable = false)
	public Order.OrderStatus getStatus() {
		return this.status;
	}

	public void setStatus(Order.OrderStatus status) {
		this.status = status;
	}

	@Column(name = "create_time", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "update_time", length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

}